<%@ page import="com.the8thfold.anton.ant.JobStatus; org.apache.tools.ant.Target" contentType="text/html;charset=UTF-8" %>
<html>
<head>
    <title>Create Job</title>
    <meta name="layout" content="main" />
</head>
<body>

<div>
    <h1>Create Job</h1>
    <hr/>
    <br/>
    <div>
        <g:form controller="job" action="save" name="newJobForm">
            <g:hiddenField name="jobId" value="${job.jobId}"/>
            <table style="border: none; width: auto;">
                <tr>
                    <td>Script:</td>
                    <td>
                        <g:select name="scriptId" from="${scripts}" value="${job.script?.scriptId}" optionKey="scriptId" optionValue="description"></g:select>
                    </td>
                </tr>
                <tr>
                    <td>Name:</td>
                    <td><input name="name" type="text" value="${job.name}" /> </td>
                </tr>
                <tr>
                    <td>Description:</td>
                    <td><input name="description" type="text" value="${job.description}" /> </td>
                </tr>
                <tr>
                    <td>State:</td>
                    <td>
                        <g:select name="jobStatus" from="${JobStatus.values()}" value="${job.jobStatus}"></g:select>
                    </td>
                </tr>
                <tr>
                    <td colspan="2"><hr/></td>
                </tr>
                <tr>
                    <td colspan="2">
                        <div class="css_right toolbar">
                            <input type="button" class="btn-text" name="cancel" onclick="history.go(-1);" value="Cancel"/>
                            <g:submitButton name="submit" value="Create" />
                        </div>
                    </td>
                </tr>
            </table>
        </g:form>
    </div>
</div>

</body>
</html>